package main

import "fmt"

//不定参数
func Test (args ...int) {
	for _,n := range args {
		fmt.Println(n)
	}
}

func main() {
	Test(1,2,3,4,5,6,7,8,9);

	a := Test01()
	fmt.Println(a)
	a = Test02()
	fmt.Println(a)

	a1,_ := Test03()
	_, a2 := Test03()

	fmt.Println(a1, a2)

	min, max := MinAndMax(11,2)

	fmt.Printf("min=%d,max=%d", min, max)
}


func Test01() int {
	return 2
}

func Test02() (v int) {
	v = 222
	return
}

func Test03() (int, string) {
	return  2221, "sss"
}

func MinAndMax(num1 int, num2 int) (min int, max int) {
	if num1 > num2 {
		min = num2
		max = num1
	} else {
		min = num1
		max = num2
	}

	return
}